//
//  WmTeamCloudEmptyView.swift
//  YPWatermarkCamera
//
//  Created by yupao_ios_macmini06 on 2022/9/13.
//

import UIKit

class WmcTeamCloudEmptyView: WmcBaseEmptyView {
    override func makeUI() {
        super.makeUI()

        backgroundColor = UIColor.wmc_gray_F7F8FA

        addSubview(imgView)
        addSubview(noteLabel)
        addSubview(takePhotoBtn)
        addSubview(inviteMemebrTakePhoto)
        ///  addSubview(testButton)

        imgView.snp.makeConstraints { make in
            make.top.equalTo(83)
            make.left.equalToSuperview().offset(Wmc_screenWidth / 2.0 - 53)
            make.width.equalTo(106)
            make.height.equalTo(118)
        }
        noteLabel.snp.makeConstraints { make in
            make.top.equalTo(imgView.snp.bottom).offset(-3)
            make.centerX.equalTo(imgView.snp.centerX)
        }

        let btnW = (Wmc_screenWidth - 48) / 2.0
        let btnH = btnW * 44 / 164

        takePhotoBtn.snp.makeConstraints { make in
            make.top.equalTo(noteLabel.snp.bottom).offset(79)
            make.left.equalTo(16)
            make.height.equalTo(btnH)
            make.width.equalTo(btnW)
        }
        inviteMemebrTakePhoto.snp.makeConstraints { make in
            make.top.equalTo(takePhotoBtn.snp.top)
            make.left.equalTo(takePhotoBtn.snp.right).offset(16)
            make.width.equalTo(btnW)
            make.height.equalTo(btnH)
        }
    }

    lazy var imgView: UIImageView = {
        let view = UIImageView()
        view.image = UIImage(named: "cloud_album_empty")
        return view
    }()

    lazy var noteLabel: UILabel = {
        let view = UILabel()
        view.textColor = UIColor.wmc_grayH8_8A8A99
        view.font = 16.yp.uiFont(weight: .regular)
        view.text = "当前暂无照片"
        return view
    }()

    lazy var takePhotoBtn: WmcNormalButton = {
        let view = WmcNormalButton()
        view.backgroundColor = UIColor.wmc_white_FFFFFF
        view.contentEdge = .YP.Create(horizontal: 18, vertical: 12)
        view.font = 16.yp.uiFont(weight: .medium)
        view.textColor = UIColor.wmc_blue_5290FD
        view.title = "去拍照试一下"
        view.textAlignment = .center
        view.layer.cornerRadius = 4
        view.clipsToBounds = true
        view.layer.borderColor = UIColor.wmc_blue_5290FD.cgColor
        view.layer.borderWidth = 1
        return view
    }()

    lazy var inviteMemebrTakePhoto: WmcNormalButton = {
        let view = WmcNormalButton()
        view.backgroundColor = UIColor.wmc_mainTheme
        view.contentEdge = .YP.Create(horizontal: 18, vertical: 12)
        view.font = 16.yp.uiFont(weight: .medium)
        view.textColor = UIColor.wmc_white_FFFFFF
        view.title = "邀请成员拍照打卡"
        view.textAlignment = .center
        view.layer.cornerRadius = 4
        view.clipsToBounds = true
        return view
    }()

    lazy var testButton: UIButton = {
        let view = UIButton()
        view.backgroundColor = .red
        return view
    }()
}
